@extends( 'layout.home' )
@section( 'content' )
    <style>
        table.list_tab tr td a {
            margin-right: 0px;
            float: none;
        }
        .result_wrap{border: 0}
        .cwdt{width: 100%;background: #eee;}
        .cwdt ul li{width: 19.5%;background: #fff;float: left;color: #666;
            height: 120px;box-sizing:border-box;padding: 10px;
        }
        .cwdt ul li:nth-of-type(odd){background: #fff;}
        .result_content ul li {
            line-height: normal;
            border: 1px dashed #ddd;
        }
    </style>
<!--面包屑导航 开始-->
<div class="crumb_warp">
    <i class="fa fa-home"></i> <a href="{{url('info')}}">首页</a> &raquo; 车位管理 &raquo; 车位地图
</div>
<!--面包屑导航 结束-->

<!--搜索结果页面 列表 开始-->
<form action="#" method="post">
    <div class="result_wrap">
        <div class="result_content">
            <div class="cwdt">
                <ul>
                    @foreach($data as $v)
                    <li
                        @if($v['is_rent'])style="background: rgba(200,100,200,0.1);"
                        @elseif($v['status'])style="background: rgba(200,100,200,0.1);"
                        @endif
                    >
                        <p style="color:#fff;
                        @if($v['is_rent'])background: rgba(0,155,255,0.9);
                        @else background: rgba(200,155,255,0.6);
                        @endif
                        text-align: center;border-radius: 5px;">{{$v['parkingspace_no']}}
                            @if($v['is_rent']) <span style="font-size: 12px;margin-left:10px;">[月租车位]</span>
                            @else <span style="font-size: 12px;margin-left:10px;">[普通车位]</span>
                            @endif
                        </p>
                        <p>
                            @if($v['status']){{$v['plate_num']}} <span style="margin-left:10px;font-size: 12px;">(停泊中)</span>
                            @elseif($v['is_rent']){{$v['plate_num']}} <span style="margin-left:10px;font-size: 12px;">(已驶出)</span>
                            @else <div style="text-align: center">空</div>
                            @endif
                        </p>
                        @if($v['status']==1)

                            @foreach($v['parking'] as $k => $v)
                            <p>驶入时间：   {{date('Y-m-d H:i',$v['drivein_time'])}}</p>
                            <p>停泊时长：   {{$v['time_diff']}}</p>
                            @endforeach
                        @endif
                        <p>
                        </p>
                    </li>
                    @endforeach
                </ul>
            </div>
        </div>
    </div>
</form>
    <script src="https://cdn.bootcss.com/layer/3.1.0/layer.js"></script>
<!--搜索结果页面 列表 结束-->
    <script>
        setTimeout(function(){  //使用  setTimeout（）方法设定定时2000毫秒
            window.location.reload();//页面刷新
        },60000);

    </script>
@endsection
